package ace.cmp.spring.data.jdbc.querydsl.annotation.processor.test;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;

/**
 * @author caspar
 * @date 2023/2/28 9:05 客户端租户应用
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
public class TableNoName implements Serializable {
  /**
   * {@link org.springframework.security.oauth2.server.authorization.client.RegisteredClient##getId()}
   */
  @Id private String id;

  /**
   * 租户id
   */
  private Long tenantId;

  /**
   * 更新时间
   */
  @LastModifiedDate private LocalDateTime updateTime;

  /**
   * 创建时间
   */
  @CreatedDate private LocalDateTime createTime;

  /**
   * 版本号和乐观锁字段,初始为0，更新自增1
   */
  @Version private Long rowVersion;
}
